package com.youlai.boot.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.youlai.boot.system.mapper.QstandardMapper;
import com.youlai.boot.system.model.QB.Qstandard;
import com.youlai.boot.system.service.QstandardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;
@Service
public class QstandardServiceImpl extends ServiceImpl<QstandardMapper, Qstandard> implements QstandardService {

    @Autowired
    private QstandardMapper qstandardMapper;
    @Override
    public boolean saveQstandard(Qstandard qstandard) {
        qstandard.setAddtime(LocalDateTime.now());
        return save(qstandard);
    }

    @Override
    public List<Qstandard> getAllQstandard() {
        return qstandardMapper.selectList(null);
    }

    @Override
    public boolean deleteQstandardById(Integer id) {
        return qstandardMapper.deleteById(id)>0;
    }
}
